Enabled sleep feature and fixed some minor issues while parsing commandline arguments