Add some file checking to sources