modifying repository API to not crash with file error