move out file_main logic
done parsing all deps
give cortex.main higher prority