File Utilities
tryToClose: Attempts to close a file.