closed our .accelere file correctly and added error handling to writing the last location out