Closed some file streams
Upload functionality complete but not working