improve error handling in di.file()
add code coverage and bump coverage back to 100%