Added "invalid file/url" check and error message for serving files