Fixing issue for empty file. Fixing java7 error