Added debug target and changed file checking sugar