Moved pathname to before block