Saving exam from file to db.