Add some error handling to the control file parsing