Hcf middleware

Fixes related to the start_job functionality and some refactoring of the error messages