exit on errors
updating for android