fixed issue with 500 error on successful creation of new file