fix check and fix uploadfile function