dded error catching for file checking