Added check before compiling or loading compiled mounted resource.