Use move_uploaded_files and avoid working with tmp file