Fixed function argument name.
Added detailed logging to gear functions.