error handling WIP
Use error_condition for all errors
file handling WIP