improved call to file handle