fix: pass the return code through main function