Adding file not found handling

If there is no problem for the requested id the api will now correctly
return a 404 status.