Fixed NPE on empty File