Added missing disposes.
Added file uploading.