Shared utility functions for IO operations and Web operations