Fixing issue resulting in unknown error if line consisted only of space characters