Corrected return values for errors, call to driver in function