Better command handling for windows and linux