fixed crash on not appected filetype, along with error page to deal with it