Cleaned up file utilities.