Rewrite os handler