Added uploaded file handling