Prevent lock when no stdin is provided
Improve error handling
Add -addshifts argument to add shifts to input