Move callback invocation outside of try block.
Added JSHint.