When creating file record with wrong attributes returns json with 500.
Added mocha.