fix UI: host/browse or host/browse? or host/browse?(anything except 'path') will crash due to NullPointerException
fix UI: set invalid offset in display file will crash, offset should be numbers and should be in range [0, size(file)]
fix UI: display file may crash due to IOException
change to more accurate error information
remove duplicated code
format
format
Merge pull request #223 from uronce-cc/UIFix

Make Web UI handle any requests (no crash)