Made debugging clearer: refactored error messages and return codes; warning on non-usable character in file