checkPathForOutput added