using tmp file instead of stderr, this cuts down useless messages on the console