Improved file url mapping