Use exit status codes

Script will return with status 1 if an error occured