Fix: unable to save empty files, js returns File could not be saved