Replace << operation, with static method that fixes potential overflow