switch to batch mode and remove if/catch/exit