Properly closes files now