added sync method to filesystem