fix executable, better error handling