fix Issue #378
Issue #400
issue #377, send 404 error for deleted files
Merge pull request #406 from hellsingblack/master

Issue #400