Docstrings
Move pipe_commands_to_file to separate file