Implemented file uploading and handling