# import in \newcommand in my package produces an error

I have written and installed my own package gym.sty. In that package I defined

since I need to execute some commands after \begin{document} for the package to be fully working. I tested it in a document that basically consists of

\usepackage{gym}
\begin{document}
\end{document}

The package all works fine and does all it is supposed to do including the \loadgym command. But it produces an error message which is annoying though harmless:

Paragraph ended before \@import was complete

Is there any way to avoid this error message? I do not know if it is relevant, but gym.sty and sagegym.tex are located in MiKTeX package folders whereas the document implementing the code is located elsewhere.

-
Welcome to TeX.sx! Can you show a bit of context about your usage of \loadgym? A minimal working example (MWE) is needed. –  egreg Mar 17 '13 at 16:55