make a commit function to catch errors, add profile.has_file
return 404 if no file