Add comments explaining file opening code

Closes #72