print logs on success and failure