Do better error handling with regards to the status_pin