File mode bugs fixed.