fixed searching error, added free() for args, fixed hostname