Fix #24: improve error messages during compilation