More requests from David. Removed debugging and made the check for local
files more bulletproof.