added file reading on form submit