Added function to write input type=file to local filesystem