Returning hash after closing file