handle writable files a bit better