Added basic option validation for tasks. Probably need improving though!!!!!