Changed lock failure to return error message