JBTM-1481 Updated to return a failure when prepare fails