update file
error handling and different file setup