Fixed but when generating path for main file