Problems are inevatible when a resource is opened, passed around and closed by a different method. This can improved upon easily.