Added exception handling for switch parameter -m for mode. Removed id row if mode is create. Fixed end date to be last date of month +1 month.