Optimize file path builder and have separate handler for streaming file