Simplify writing status to file and throw Exception on failure