Cleanup and more route fixing
Added error handling for non-supported file types