implented exit code 1 on any errors