Added access() calls to give useful error messages when files not found.