add validations
add test for function raising exception
add test for validation when trying to use stdin/stdout in non piped mode