Fixed bug where uploaded file was saved regardless.