formatted output by adding 'status'. Also printing error back to the user in case of a problem