Include file name in warnings raised by add_object_info

Also adds tests for file name in warning. Closes #51