add better file serving error handling