Fix file upload modes
Add option for specifying custom file names
Rename first parameter of form options to key in order to avoid confusion with file names
Fix misplaced throw_error call
Add better error handling to form wrapper functions