Generate a better error when input file is too thin and no layers could be generated. #1127