Adding environment dependency checking to custom plugin