file cleanup
fixed warning (endif with wrong parameters)