fix no file type bug, for mirror server
pass serverURL as parameter to functions
register as receiver on window.onload