Added check for missing main procedure (commented out exception for now)