also check if file is writable