added error returns to commands framework