fix many bugs
handle size of uploaded file