Add tests for missing files; switch to LoomError in format.py