implement paths and args checking. file checking is half-baked