Added linux/mac version to main and module def, fixed debug output in signal handler