Properly working FileStorage.java