Preliminary file checking and argument rejecting.