Closing a file properly.