Error checking
Adde dposatlimit to csv output