Fixed -l option

Print an error message when invalid loglevel value is provided
Exit with an error code