fileFromPath & main modification