error handling improved

…when  parameters are missing