Improved url input
Fixed bug in filename detection